home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 April: Mac OS SDK / Dev.CD Apr 97 SDK1.toast / Development Kits (Disc 1) / ColorSync 2.1.2 GM / Interfaces / PInterfaces / CMICCProfile.p < prev    next >
Encoding:
Text File  |  1997-02-18  |  25.5 KB  |  719 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMICCProfile.p
  3.  
  4.      Contains:    Definitions for ColorSync 2.0 profile
  5.  
  6.      Version:    ColorSync 2.1
  7.  
  8.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  9.                  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT CMICCProfile;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __CMICCPROFILE__}
  28. {$SETC __CMICCPROFILE__ := 1}
  29.  
  30. {$I+}
  31. {$SETC CMICCProfileIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37.  
  38. {$PUSH}
  39. {$ALIGN MAC68K}
  40. {$LibExport+}
  41.  
  42. {  Current CMProfile.header.profileVersion Major: 2, Minor: 0, Stage: Developement (x20), Prerelease:0x01  }
  43.  
  44. CONST
  45.     cmCS2ProfileVersion            = $02000000;
  46. {  Current Major version number  }
  47.     cmCurrentProfileMajorVersion = $02000000;
  48. {  magic cookie number for anonymous file ID  }
  49.     cmMagicNumber                = 'acsp';
  50. {  ColorSync profile version 1.0  }
  51.     cmCS1ProfileVersion            = $00000100;
  52. { ********************************************************************** }
  53. { ************** ColorSync 2.0 profile specification ******************* }
  54. { ********************************************************************** }
  55. { *** flags field  *** }
  56.     cmICCReservedFlagsMask        = $0000FFFF;                    {  these bits of the flags field are defined and reserved by ICC  }
  57.     cmEmbeddedMask                = $00000001;                    {  if bit 0 is 0 then not embedded profile, if 1 then embedded profile  }
  58.     cmEmbeddedUseMask            = $00000002;                    {  if bit 1 is 0 then ok to use anywhere, if 1 then ok to use as embedded profile only  }
  59.     cmCMSReservedFlagsMask        = $FFFF0000;                    {  these bits of the flags field are defined and reserved by CMS vendor  }
  60.     cmQualityMask                = $00030000;                    {  if bits 17-18 is 0 then normal, if 1 then draft, if 2 then best  }
  61.     cmInterpolationMask            = $00040000;                    {  if bit 19 is 0 then interpolation, if 1 then lookup only  }
  62.     cmGamutCheckingMask            = $00080000;                    {  if bit 20 is 0 then create gamut checking info, if 1 then no gamut checking info  }
  63. {  copyright-protection flag options  }
  64.     cmEmbeddedProfile            = 0;                            {  0 is not embedded profile, 1 is embedded profile  }
  65.     cmEmbeddedUse                = 1;                            {  0 is to use anywhere, 1 is to use as embedded profile only  }
  66. {  speed and quality flag options  }
  67.     cmNormalMode                = 0;                            {  it uses the least significent two bits in the high word of flag  }
  68.     cmDraftMode                    = 1;                            {  it should be evaulated like this: right shift 16 bits first, mask off the  }
  69.     cmBestMode                    = 2;                            {  high 14 bits, and then compare with the enum to determine the option value  }
  70. { *** deviceAttributes fields *** }
  71.     cmICCReservedAttr0Mask        = $0000FFFF;                    {  these bits of the deviceAttributes[0] field are defined and reserved by ICC  }
  72.     cmReflectiveTransparentMask    = $00000001;                    {  if bit 0 is 0 then reflective media, if 1 then transparency media  }
  73.     cmGlossyMatteMask            = $00000002;                    {  if bit 1 is 0 then glossy, if 1 then matte  }
  74.     cmVendorReservedAttr0Mask    = $FFFF0000;                    {  these bits of the deviceAttributes[0] field are defined and reserved by device vendor  }
  75.     cmVendorReservedAttr1Mask    = $FFFFFFFF;                    {  these bits of the deviceAttributes[1] field are defined and reserved by device vendor  }
  76. {  device/media attributes element values   }
  77.     cmReflective                = 0;                            {  if bit 0 is 0 then reflective media, if 1 then transparency media  }
  78.     cmGlossy                    = 1;                            {  if bit 1 is 0 then glossy, if 1 then matte  }
  79. { *** renderingIntent field *** }
  80.     cmPerceptual                = 0;                            {  Photographic images  }
  81.     cmRelativeColorimetric        = 1;                            {  Logo Colors  }
  82.     cmSaturation                = 2;                            {  Business graphics  }
  83.     cmAbsoluteColorimetric        = 3;                            {  Logo Colors  }
  84. {  data type element values  }
  85.     cmAsciiData                    = 0;
  86.     cmBinaryData                = 1;
  87. {  screen encodings   }
  88.     cmPrtrDefaultScreens        = 0;                            {  Use printer default screens.  0 is false, 1 is ture  }
  89.     cmLinesPer                    = 1;                            {  0 is LinesPerCm, 1 is LinesPerInch  }
  90. {  2.0 tag type information  }
  91.     cmNumHeaderElements            = 10;
  92. {  public tags  }
  93.     cmAToB0Tag                    = 'A2B0';
  94.     cmAToB1Tag                    = 'A2B1';
  95.     cmAToB2Tag                    = 'A2B2';
  96.     cmBlueColorantTag            = 'bXYZ';
  97.     cmBlueTRCTag                = 'bTRC';
  98.     cmBToA0Tag                    = 'B2A0';
  99.     cmBToA1Tag                    = 'B2A1';
  100.     cmBToA2Tag                    = 'B2A2';
  101.     cmCalibrationDateTimeTag    = 'calt';
  102.     cmCharTargetTag                = 'targ';
  103.     cmCopyrightTag                = 'cprt';
  104.     cmDeviceMfgDescTag            = 'dmnd';
  105.     cmDeviceModelDescTag        = 'dmdd';
  106.     cmGamutTag                    = 'gamt';
  107.     cmGrayTRCTag                = 'kTRC';
  108.     cmGreenColorantTag            = 'gXYZ';
  109.     cmGreenTRCTag                = 'gTRC';
  110.     cmLuminanceTag                = 'lumi';
  111.     cmMeasurementTag            = 'meas';
  112.     cmMediaBlackPointTag        = 'bkpt';
  113.     cmMediaWhitePointTag        = 'wtpt';
  114.     cmNamedColorTag                = 'ncol';
  115.     cmNamedColor2Tag            = 'ncl2';
  116.     cmPreview0Tag                = 'pre0';
  117.     cmPreview1Tag                = 'pre1';
  118.     cmPreview2Tag                = 'pre2';
  119.     cmProfileDescriptionTag        = 'desc';
  120.     cmProfileSequenceDescTag    = 'pseq';
  121.     cmPS2CRD0Tag                = 'psd0';
  122.     cmPS2CRD1Tag                = 'psd1';
  123.     cmPS2CRD2Tag                = 'psd2';
  124.     cmPS2CRD3Tag                = 'psd3';
  125.     cmPS2CSATag                    = 'ps2s';
  126.     cmPS2RenderingIntentTag        = 'ps2i';
  127.     cmRedColorantTag            = 'rXYZ';
  128.     cmRedTRCTag                    = 'rTRC';
  129.     cmScreeningDescTag            = 'scrd';
  130.     cmScreeningTag                = 'scrn';
  131.     cmTechnologyTag                = 'tech';
  132.     cmUcrBgTag                    = 'bfd ';
  133.     cmViewingConditionsDescTag    = 'vued';
  134.     cmViewingConditionsTag        = 'view';
  135. {  custom tags  }
  136.     cmPS2CRDVMSizeTag            = 'psvm';
  137. {  technology tag descriptions  }
  138.     cmTechnologyFilmScanner        = 'fscn';
  139.     cmTechnologyReflectiveScanner = 'rscn';
  140.     cmTechnologyInkJetPrinter    = 'ijet';
  141.     cmTechnologyThermalWaxPrinter = 'twax';
  142.     cmTechnologyElectrophotographicPrinter = 'epho';
  143.     cmTechnologyElectrostaticPrinter = 'esta';
  144.     cmTechnologyDyeSublimationPrinter = 'dsub';
  145.     cmTechnologyPhotographicPaperPrinter = 'rpho';
  146.     cmTechnologyFilmWriter        = 'fprn';
  147.     cmTechnologyVideoMonitor    = 'vidm';
  148.     cmTechnologyVideoCamera        = 'vidc';
  149.     cmTechnologyProjectionTelevision = 'pjtv';
  150.     cmTechnologyCRTDisplay        = 'CRT ';
  151.     cmTechnologyPMDisplay        = 'PMD ';
  152.     cmTechnologyAMDisplay        = 'AMD ';
  153.     cmTechnologyPhotoCD            = 'KPCD';
  154.     cmTechnologyPhotoImageSetter = 'imgs';
  155.     cmTechnologyGravure            = 'grav';
  156.     cmTechnologyOffsetLithography = 'offs';
  157.     cmTechnologySilkscreen        = 'silk';
  158.     cmTechnologyFlexography        = 'flex';
  159. {  type signatures  }
  160.     cmSigCurveType                = 'curv';
  161.     cmSigDataType                = 'data';
  162.     cmSigDateTimeType            = 'dtim';
  163.     cmSigLut16Type                = 'mft2';
  164.     cmSigLut8Type                = 'mft1';
  165.     cmSigMeasurementType        = 'meas';
  166.     cmSigNamedColorType            = 'ncol';
  167.     cmSigNamedColor2Type        = 'ncl2';
  168.     cmSigProfileDescriptionType    = 'desc';
  169.     cmSigScreeningType            = 'scrn';
  170.     cmSigS15Fixed16Type            = 'sf32';
  171.     cmSigSignatureType            = 'sig ';
  172.     cmSigTextType                = 'text';
  173.     cmSigU16Fixed16Type            = 'uf32';
  174.     cmSigU1Fixed15Type            = 'uf16';
  175.     cmSigUInt32Type                = 'ui32';
  176.     cmSigUInt64Type                = 'ui64';
  177.     cmSigUInt8Type                = 'ui08';
  178.     cmSigViewingConditionsType    = 'view';
  179.     cmSigXYZType                = 'XYZ ';
  180. {  Measurement type encodings  }
  181. {  Measurement Flare  }
  182.     cmFlare0                    = $00000000;
  183.     cmFlare100                    = $00000001;
  184. {  Measurement Geometry     }
  185.     cmGeometryUnknown            = $00000000;
  186.     cmGeometry045or450            = $00000001;
  187.     cmGeometry0dord0            = $00000002;
  188. {  Standard Observer     }
  189.     cmStdobsUnknown                = $00000000;
  190.     cmStdobs1931TwoDegrees        = $00000001;
  191.     cmStdobs1964TenDegrees        = $00000002;
  192. {  Standard Illuminant  }
  193.     cmIlluminantUnknown            = $00000000;
  194.     cmIlluminantD50                = $00000001;
  195.     cmIlluminantD65                = $00000002;
  196.     cmIlluminantD93                = $00000003;
  197.     cmIlluminantF2                = $00000004;
  198.     cmIlluminantD55                = $00000005;
  199.     cmIlluminantA                = $00000006;
  200.     cmIlluminantEquiPower        = $00000007;
  201.     cmIlluminantF8                = $00000008;
  202. {  Spot Function Value  }
  203.     cmSpotFunctionUnknown        = 0;
  204.     cmSpotFunctionDefault        = 1;
  205.     cmSpotFunctionRound            = 2;
  206.     cmSpotFunctionDiamond        = 3;
  207.     cmSpotFunctionEllipse        = 4;
  208.     cmSpotFunctionLine            = 5;
  209.     cmSpotFunctionSquare        = 6;
  210.     cmSpotFunctionCross            = 7;
  211. {  Color Space Signatures  }
  212.     cmXYZData                    = 'XYZ ';
  213.     cmLabData                    = 'Lab ';
  214.     cmLuvData                    = 'Luv ';
  215.     cmYxyData                    = 'Yxy ';
  216.     cmRGBData                    = 'RGB ';
  217.     cmGrayData                    = 'GRAY';
  218.     cmHSVData                    = 'HSV ';
  219.     cmHLSData                    = 'HLS ';
  220.     cmCMYKData                    = 'CMYK';
  221.     cmCMYData                    = 'CMY ';
  222.     cmMCH5Data                    = 'MCH5';
  223.     cmMCH6Data                    = 'MCH6';
  224.     cmMCH7Data                    = 'MCH7';
  225.     cmMCH8Data                    = 'MCH8';
  226. {  profileClass enumerations  }
  227.     cmInputClass                = 'scnr';
  228.     cmDisplayClass                = 'mntr';
  229.     cmOutputClass                = 'prtr';
  230.     cmLinkClass                    = 'link';
  231.     cmAbstractClass                = 'abst';
  232.     cmColorSpaceClass            = 'spac';
  233.     cmNamedColorClass            = 'nmcl';
  234. {  platform enumerations  }
  235.     cmMacintosh                    = 'APPL';
  236.     cmMicrosoft                    = 'MSFT';
  237.     cmSolaris                    = 'SUNW';
  238.     cmSiliconGraphics            = 'SGI ';
  239.     cmTaligent                    = 'TGNT';
  240. {  ColorSync 1.0 elements  }
  241.     cmCS1ChromTag                = 'chrm';
  242.     cmCS1TRCTag                    = 'trc ';
  243.     cmCS1NameTag                = 'name';
  244.     cmCS1CustTag                = 'cust';
  245. {  General element data types  }
  246.  
  247. TYPE
  248.     CMDateTimePtr = ^CMDateTime;
  249.     CMDateTime = RECORD
  250.         year:                    INTEGER;
  251.         month:                    INTEGER;
  252.         dayOfTheMonth:            INTEGER;
  253.         hours:                    INTEGER;
  254.         minutes:                INTEGER;
  255.         seconds:                INTEGER;
  256.     END;
  257.  
  258.     CMFixedXYZColorPtr = ^CMFixedXYZColor;
  259.     CMFixedXYZColor = RECORD
  260.         X:                        Fixed;
  261.         Y:                        Fixed;
  262.         Z:                        Fixed;
  263.     END;
  264.  
  265.     CMXYZComponent                        = INTEGER;
  266.     CMXYZColorPtr = ^CMXYZColor;
  267.     CMXYZColor = RECORD
  268.         X:                        CMXYZComponent;
  269.         Y:                        CMXYZComponent;
  270.         Z:                        CMXYZComponent;
  271.     END;
  272.  
  273.     CM2HeaderPtr = ^CM2Header;
  274.     CM2Header = RECORD
  275.         size:                    LONGINT;                                {  This is the total size of the Profile  }
  276.         CMMType:                OSType;                                    {  CMM signature,  Registered with CS2 consortium   }
  277.         profileVersion:            LONGINT;                                {  Version of CMProfile format  }
  278.         profileClass:            OSType;                                    {  input, display, output, devicelink, abstract, or color conversion profile type  }
  279.         dataColorSpace:            OSType;                                    {  color space of data  }
  280.         profileConnectionSpace:    OSType;                                    {  profile connection color space  }
  281.         dateTime:                CMDateTime;                                {  date and time of profile creation  }
  282.         CS2profileSignature:    OSType;                                    {  'acsp' constant ColorSync 2.0 file ID  }
  283.         platform:                OSType;                                    {  primary profile platform, Registered with CS2 consortium  }
  284.         flags:                    LONGINT;                                {  profile flags  }
  285.         deviceManufacturer:        OSType;                                    {  Registered with ICC consortium  }
  286.         deviceModel:            LONGINT;                                {  Registered with ICC consortium  }
  287.         deviceAttributes:        ARRAY [0..1] OF LONGINT;                {  Attributes like paper type  }
  288.         renderingIntent:        LONGINT;                                {  preferred rendering intent of tagged object  }
  289.         white:                    CMFixedXYZColor;                        {  profile illuminant  }
  290.         creator:                OSType;                                    {  profile creator  }
  291.         reserved:                PACKED ARRAY [0..43] OF CHAR;            {  reserved for future use  }
  292.     END;
  293.  
  294.     CMTagRecordPtr = ^CMTagRecord;
  295.     CMTagRecord = RECORD
  296.         tag:                    OSType;                                    {  Registered with CS2 consortium  }
  297.         elementOffset:            LONGINT;                                {  Relative to start of CMProfile  }
  298.         elementSize:            LONGINT;
  299.     END;
  300.  
  301.     CMTagElemTablePtr = ^CMTagElemTable;
  302.     CMTagElemTable = RECORD
  303.         count:                    LONGINT;
  304.         tagList:                ARRAY [0..0] OF CMTagRecord;            {  Variable size  }
  305.     END;
  306.  
  307. {  External 0x02002001 CMProfile  }
  308.     CM2ProfilePtr = ^CM2Profile;
  309.     CM2Profile = RECORD
  310.         header:                    CM2Header;
  311.         tagTable:                CMTagElemTable;
  312.         elemData:                SInt8;                                    {  Tagged element storage. Variable size  }
  313.     END;
  314.  
  315.     CM2ProfileHandle                    = ^CM2ProfilePtr;
  316. {  Tag Type Definitions  }
  317.     CMCurveTypePtr = ^CMCurveType;
  318.     CMCurveType = RECORD
  319.         typeDescriptor:            OSType;                                    {  'curv'  }
  320.         reserved:                LONGINT;                                {  fill with 0x00  }
  321.         countValue:                LONGINT;                                {  number of entries in table that follows  }
  322.         data:                    ARRAY [0..0] OF INTEGER;                {  Tagged element storage. Variable size  }
  323.     END;
  324.  
  325.     CMDataTypePtr = ^CMDataType;
  326.     CMDataType = RECORD
  327.         typeDescriptor:            OSType;                                    {  'data'  }
  328.         reserved:                LONGINT;                                {  fill with 0x00  }
  329.         dataFlag:                LONGINT;                                {  0 = ASCII, 1 = binary  }
  330.         data:                    SInt8;                                    {  Tagged element storage. Variable size  }
  331.     END;
  332.  
  333.     CMDateTimeTypePtr = ^CMDateTimeType;
  334.     CMDateTimeType = RECORD
  335.         typeDescriptor:            OSType;                                    {  'dtim'  }
  336.         reserved:                LONGINT;
  337.         dateTime:                CMDateTime;
  338.     END;
  339.  
  340.     CMLut16TypePtr = ^CMLut16Type;
  341.     CMLut16Type = RECORD
  342.         typeDescriptor:            OSType;                                    {  'mft2'  }
  343.         reserved:                LONGINT;                                {  fill with 0x00  }
  344.         inputChannels:            SInt8;                                    {  Number of input channels  }
  345.         outputChannels:            SInt8;                                    {  Number of output channels  }
  346.         gridPoints:                SInt8;                                    {  Number of clutTable grid points  }
  347.         reserved2:                SInt8;                                    {  fill with 0x00  }
  348.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                {   }
  349.         inputTableEntries:        INTEGER;                                {   }
  350.         outputTableEntries:        INTEGER;                                {   }
  351.         inputTable:                ARRAY [0..0] OF INTEGER;                {  Variable size  }
  352.         CLUT:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  353.         outputTable:            ARRAY [0..0] OF INTEGER;                {  Variable size  }
  354.     END;
  355.  
  356.     CMLut8TypePtr = ^CMLut8Type;
  357.     CMLut8Type = RECORD
  358.         typeDescriptor:            OSType;                                    {  'mft1'  }
  359.         reserved:                LONGINT;                                {  fill with 0x00  }
  360.         inputChannels:            SInt8;                                    {   }
  361.         outputChannels:            SInt8;                                    {   }
  362.         gridPoints:                SInt8;                                    {   }
  363.         reserved2:                SInt8;                                    {  fill with 0x00  }
  364.         matrix:                    ARRAY [0..2,0..2] OF Fixed;                {   }
  365.         inputTable:                PACKED ARRAY [0..255] OF UInt8;            {  fixed size of 256  }
  366.         CLUT:                    PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  367.         outputTable:            PACKED ARRAY [0..255] OF UInt8;            {  fixed size of 256  }
  368.     END;
  369.  
  370.     CMMeasurementTypePtr = ^CMMeasurementType;
  371.     CMMeasurementType = RECORD
  372.         typeDescriptor:            OSType;                                    {  'meas'  }
  373.         reserved:                LONGINT;                                {  fill with 0x00  }
  374.         standardObserver:        LONGINT;                                {  0 : unknown, 1 : CIE 1931, 2 : CIE 1964  }
  375.         backingXYZ:                CMFixedXYZColor;                        {  absolute XYZ values of backing  }
  376.         geometry:                LONGINT;                                {  0 : unknown, 1 : 0/45 or 45/0, 2 :0/d or d/0  }
  377.         flare:                    LONGINT;                                {  0 : 0%, 1 : 100% flare  }
  378.         illuminant:                LONGINT;                                {  standard illuminant  }
  379.     END;
  380.  
  381.     CMNamedColorTypePtr = ^CMNamedColorType;
  382.     CMNamedColorType = RECORD
  383.         typeDescriptor:            OSType;                                    {  'ncol'  }
  384.         reserved:                LONGINT;                                {  fill with 0x00  }
  385.         vendorFlag:                LONGINT;                                {   }
  386.         count:                    LONGINT;                                {  count of named colors in array that follows  }
  387.         prefixName:                SInt8;                                    {  Variable size, max = 32, to access fields after this one, have to count bytes  }
  388.         suffixName:                SInt8;                                    {  Variable size, max = 32  }
  389.         data:                    SInt8;                                    {  varaible size data as explained below  }
  390.     END;
  391.  
  392. {
  393.     A variable size array of structs appears as the last block of data
  394.     in the above struct, CMNamedColorType.  The data structure
  395.     is as follows: (example in C)
  396.     
  397.      struct (                                             
  398.             unsigned char    rootName[1];                 * Variable size, max = 32 
  399.             unsigned char    colorCoords[1];                 * Variable size  
  400.      ) colorName[1];                                     * Variable size  
  401. }
  402.     CMNamedColor2TypePtr = ^CMNamedColor2Type;
  403.     CMNamedColor2Type = RECORD
  404.         typeDescriptor:            OSType;                                    {  'ncl2'  }
  405.         reserved:                LONGINT;                                {  fill with 0x00  }
  406.         vendorFlag:                LONGINT;                                {  lower 16 bits reserved for ICC use  }
  407.         count:                    LONGINT;                                {  count of named colors in array that follows  }
  408.         deviceChannelCount:        LONGINT;                                {  number of device channels, 0 indicates no device value available  }
  409.         prefixName:                PACKED ARRAY [0..31] OF UInt8;            {  32 byte field.  7 bit ASCII null terminated  }
  410.         suffixName:                PACKED ARRAY [0..31] OF UInt8;            {  32 byte field.  7 bit ASCII null terminated  }
  411.         data:                    SInt8;                                    {  varaible size data as explained below  }
  412.     END;
  413.  
  414. {
  415.     A variable size array of structs appears as the last block of data
  416.     in the above struct, CMNamedColor2Type.  The data structure
  417.     is as follows: (example in C)
  418.     
  419.      struct (                                             
  420.             unsigned char    rootName[1];                 * 32 byte field.  7 bit ASCII null terminated
  421.             unsigned char    PCSColorCoords[1];             * Variable size  
  422.             unsigned char    DeviceColorCoords[1];         * Variable size  
  423.      ) colorName2[1];                                     * Variable size  
  424. }
  425.     CMTextDescriptionTypePtr = ^CMTextDescriptionType;
  426.     CMTextDescriptionType = PACKED RECORD
  427.         typeDescriptor:            OSType;                                    {  'desc'  }
  428.         reserved:                LONGINT;                                {  fill with 0x00  }
  429.         ASCIICount:                LONGINT;                                {  the count of "bytes"  }
  430.         ASCIIName:                PACKED ARRAY [0..1] OF UInt8;            {  Variable size, to access fields after this one, have to count bytes  }
  431.         UniCodeCode:            LONGINT;
  432.         UniCodeCount:            LONGINT;                                {  the count of characters, each character has two bytes  }
  433.         UniCodeName:            PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  434.         ScriptCodeCode:            INTEGER;
  435.         ScriptCodeCount:        UInt8;                                    {  the count of "bytes"  }
  436.         ScriptCodeName:            PACKED ARRAY [0..1] OF UInt8;            {  Variable size  }
  437.     END;
  438.  
  439.     CMTextTypePtr = ^CMTextType;
  440.     CMTextType = RECORD
  441.         typeDescriptor:            OSType;                                    {  'text'  }
  442.         reserved:                LONGINT;                                {  fill with 0x00  }
  443.         text:                    SInt8;                                    {  count of text is obtained from tag size element  }
  444.     END;
  445.  
  446.     CMScreeningTypePtr = ^CMScreeningType;
  447.     CMScreeningType = RECORD
  448.         typeDescriptor:            OSType;                                    {  'scrn'  }
  449.         reserved:                LONGINT;                                {  fill with 0x00  }
  450.         screeningFlag:            LONGINT;                                {  bit 0 : use printer default screens, bit 1 : inch/cm  }
  451.         channelCount:            LONGINT;
  452.         data:                    SInt8;                                    {  varaible size data as explained below  }
  453.     END;
  454.  
  455. {
  456.     A variable size array of structs appears as the last block of data
  457.     in the above struct, CMScreeningType.  The data structure
  458.     is as follows: (example in C)
  459.     
  460.     struct (
  461.         Fixed            frequency;
  462.         Fixed            angle;
  463.         unsigned long    sportFunction;
  464.      )    channelScreening[1];                             * Variable size 
  465. }
  466.     CMSignatureTypePtr = ^CMSignatureType;
  467.     CMSignatureType = RECORD
  468.         typeDescriptor:            OSType;                                    {  'sig '  }
  469.         reserved:                LONGINT;                                {  fill with 0x00  }
  470.         signature:                OSType;
  471.     END;
  472.  
  473.     CMS15Fixed16ArrayTypePtr = ^CMS15Fixed16ArrayType;
  474.     CMS15Fixed16ArrayType = RECORD
  475.         typeDescriptor:            OSType;                                    {  'sf32'  }
  476.         reserved:                LONGINT;                                {  fill with 0x00  }
  477.         value:                    ARRAY [0..0] OF Fixed;                    {  Variable size  }
  478.     END;
  479.  
  480.     CMU16Fixed16ArrayTypePtr = ^CMU16Fixed16ArrayType;
  481.     CMU16Fixed16ArrayType = RECORD
  482.         typeDescriptor:            OSType;                                    {  'uf32'  }
  483.         reserved:                LONGINT;                                {  fill with 0x00  }
  484.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size  }
  485.     END;
  486.  
  487.     CMUInt16ArrayTypePtr = ^CMUInt16ArrayType;
  488.     CMUInt16ArrayType = RECORD
  489.         typeDescriptor:            OSType;                                    {  'ui16'  }
  490.         reserved:                LONGINT;                                {  fill with 0x00  }
  491.         value:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  492.     END;
  493.  
  494.     CMUInt32ArrayTypePtr = ^CMUInt32ArrayType;
  495.     CMUInt32ArrayType = RECORD
  496.         typeDescriptor:            OSType;                                    {  'ui32'  }
  497.         reserved:                LONGINT;                                {  fill with 0x00  }
  498.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size  }
  499.     END;
  500.  
  501.     CMUInt64ArrayTypePtr = ^CMUInt64ArrayType;
  502.     CMUInt64ArrayType = RECORD
  503.         typeDescriptor:            OSType;                                    {  'ui64'  }
  504.         reserved:                LONGINT;                                {  fill with 0x00  }
  505.         value:                    ARRAY [0..0] OF LONGINT;                {  Variable size (x2)  }
  506.     END;
  507.  
  508.     CMUInt8ArrayTypePtr = ^CMUInt8ArrayType;
  509.     CMUInt8ArrayType = RECORD
  510.         typeDescriptor:            OSType;                                    {  'ui08'  }
  511.         reserved:                LONGINT;                                {  fill with 0x00  }
  512.         value:                    SInt8;                                    {  Variable size  }
  513.     END;
  514.  
  515.     CMViewingConditionsTypePtr = ^CMViewingConditionsType;
  516.     CMViewingConditionsType = RECORD
  517.         typeDescriptor:            OSType;                                    {  'view'  }
  518.         reserved:                LONGINT;                                {  fill with 0x00  }
  519.         illuminant:                CMFixedXYZColor;                        {  absolute XYZs of illuminant  in cd/m^2  }
  520.         surround:                CMFixedXYZColor;                        {  absolute XYZs of surround in cd/m^2  }
  521.         stdIlluminant:            LONGINT;                                {  see definitions of std illuminants  }
  522.     END;
  523.  
  524.     CMXYZTypePtr = ^CMXYZType;
  525.     CMXYZType = RECORD
  526.         typeDescriptor:            OSType;                                    {  'XYZ '  }
  527.         reserved:                LONGINT;                                {  fill with 0x00  }
  528.         XYZ:                    ARRAY [0..0] OF CMFixedXYZColor;        {  variable size XYZ tristimulus values  }
  529.     END;
  530.  
  531. {  Profile sequence description type  }
  532.     CMProfileSequenceDescTypePtr = ^CMProfileSequenceDescType;
  533.     CMProfileSequenceDescType = RECORD
  534.         typeDescriptor:            OSType;                                    {  'pseq '  }
  535.         reserved:                LONGINT;                                {  fill with 0x00  }
  536.         count:                    LONGINT;                                {  Number of descriptions  }
  537.         data:                    SInt8;                                    {  varaible size data as explained below  }
  538.     END;
  539.  
  540. {
  541.     A variable size array of structs appears as the last block of data
  542.     in the above struct, CMProfileSequenceDescType.  The data structure
  543.     is as follows: (example in C)
  544.     
  545.      struct (                                             
  546.             OSType            deviceMfg;                     * Device Manufacturer 
  547.             OSType            deviceModel;                 * Decvice Model 
  548.             unsigned long    attributes[2];                 * Device attributes 
  549.             OSType            technology;                     * Technology signature 
  550.             unsigned long    mfgDescASCIICount;             * the count of "bytes" 
  551.             unsigned char    mfgDescASCIIName[2];         * Variable size 
  552.             unsigned long    mfgDescUniCodeCode;             
  553.             unsigned long    mfgDescUniCodeCount;         * the count of characters, each character has two bytes 
  554.             unsigned char    mfgDescUniCodeName[2];         * Variable size 
  555.             unsigned long    mfgDescScriptCodeCode;         
  556.             unsigned long    mfgDescScriptCodeCount;         * the count of "bytes" 
  557.             unsigned char    mfgDescScriptCodeName[2];     * Variable size 
  558.             unsigned long    modelDescASCIICount;         * the count of "bytes" 
  559.             unsigned char    modelDescASCIIName[2];         * Variable size 
  560.             unsigned long    modelDescUniCodeCode;         
  561.             unsigned long    modelDescUniCodeCount;         * the count of characters, each character has two bytes 
  562.             unsigned char    modelDescUniCodeName[2];     * Variable size 
  563.             short            modelDescScriptCodeCode;     
  564.             unsigned char    modelDescScriptCodeCount;     * the count of "bytes" 
  565.             SInt8            filler;                         * For proper alignment across languages 
  566.             unsigned char    modelDescScriptCodeName[2];     * Variable size 
  567.      )    profileDescription[1];                         
  568. }
  569. {  Under color removal, black generation type  }
  570.     CMUcrBgTypePtr = ^CMUcrBgType;
  571.     CMUcrBgType = RECORD
  572.         typeDescriptor:            OSType;                                    {  'bfd  '  }
  573.         reserved:                LONGINT;                                {  fill with 0x00  }
  574.         ucrCount:                LONGINT;                                {  Number of UCR entries  }
  575.         ucrValues:                ARRAY [0..0] OF INTEGER;                {  variable size  }
  576.         bgCount:                LONGINT;                                {  Number of BG entries  }
  577.         bgValues:                ARRAY [0..0] OF INTEGER;                {  variable size  }
  578.         ucrbgASCII:                SInt8;                                    {  null terminated ASCII string  }
  579.     END;
  580.  
  581.     CMIntentCRDVMSizePtr = ^CMIntentCRDVMSize;
  582.     CMIntentCRDVMSize = RECORD
  583.         renderingIntent:        LONGINT;                                {  rendering intent  }
  584.         VMSize:                    LONGINT;                                {  VM size taken up by the CRD  }
  585.     END;
  586.  
  587.     CMPS2CRDVMSizeTypePtr = ^CMPS2CRDVMSizeType;
  588.     CMPS2CRDVMSizeType = RECORD
  589.         typeDescriptor:            OSType;                                    {  'psvm'  }
  590.         reserved:                LONGINT;                                {  fill with 0x00  }
  591.         count:                    LONGINT;                                {  number of intent entries  }
  592.         intentCRD:                ARRAY [0..0] OF CMIntentCRDVMSize;        {  variable size  }
  593.     END;
  594.  
  595. { ********************************************************************** }
  596. { ************** ColorSync 1.0 profile specification ******************* }
  597. { ********************************************************************** }
  598.  
  599. CONST
  600.     cmGrayResponse                = 0;
  601.     cmRedResponse                = 1;
  602.     cmGreenResponse                = 2;
  603.     cmBlueResponse                = 3;
  604.     cmCyanResponse                = 4;
  605.     cmMagentaResponse            = 5;
  606.     cmYellowResponse            = 6;
  607.     cmUcrResponse                = 7;
  608.     cmBgResponse                = 8;
  609.     cmOnePlusLastResponse        = 9;
  610. {  Device types  }
  611.     cmMonitorDevice                = 'mntr';
  612.     cmScannerDevice                = 'scnr';
  613.     cmPrinterDevice                = 'prtr';
  614.  
  615. TYPE
  616.     CMIStringPtr = ^CMIString;
  617.     CMIString = RECORD
  618.         theScript:                ScriptCode;
  619.         theString:                Str63;
  620.     END;
  621.  
  622. {  Profile options  }
  623.  
  624. CONST
  625.     cmPerceptualMatch            = $0000;                        {  Default. For photographic images  }
  626.     cmColorimetricMatch            = $0001;                        {  Exact matching when possible  }
  627.     cmSaturationMatch            = $0002;                        {  For solid colors  }
  628. {  Profile flags  }
  629.     cmNativeMatchingPreferred    = $00000001;                    {  Default to native not preferred  }
  630.     cmTurnOffCache                = $00000002;                    {  Default to turn on CMM cache  }
  631.  
  632. TYPE
  633.     CMMatchOption                        = LONGINT;
  634.     CMMatchFlag                            = LONGINT;
  635.     CMHeaderPtr = ^CMHeader;
  636.     CMHeader = RECORD
  637.         size:                    LONGINT;
  638.         CMMType:                OSType;
  639.         applProfileVersion:        LONGINT;
  640.         dataType:                OSType;
  641.         deviceType:                OSType;
  642.         deviceManufacturer:        OSType;
  643.         deviceModel:            LONGINT;
  644.         deviceAttributes:        ARRAY [0..1] OF LONGINT;
  645.         profileNameOffset:        LONGINT;
  646.         customDataOffset:        LONGINT;
  647.         flags:                    CMMatchFlag;
  648.         options:                CMMatchOption;
  649.         white:                    CMXYZColor;
  650.         black:                    CMXYZColor;
  651.     END;
  652.  
  653.     CMProfileChromaticitiesPtr = ^CMProfileChromaticities;
  654.     CMProfileChromaticities = RECORD
  655.         red:                    CMXYZColor;
  656.         green:                    CMXYZColor;
  657.         blue:                    CMXYZColor;
  658.         cyan:                    CMXYZColor;
  659.         magenta:                CMXYZColor;
  660.         yellow:                    CMXYZColor;
  661.     END;
  662.  
  663.     CMProfileResponsePtr = ^CMProfileResponse;
  664.     CMProfileResponse = RECORD
  665.         counts:                    ARRAY [0..8] OF INTEGER;
  666.         data:                    ARRAY [0..0] OF INTEGER;                {  Variable size  }
  667.     END;
  668.  
  669.     CMProfilePtr = ^CMProfile;
  670.     CMProfile = RECORD
  671.         header:                    CMHeader;
  672.         profile:                CMProfileChromaticities;
  673.         response:                CMProfileResponse;
  674.         profileName:            CMIString;
  675.         customData:                SInt8;                                    {  Variable size  }
  676.     END;
  677.  
  678.     CMProfileHandle                        = ^CMProfilePtr;
  679. {$IFC OLDROUTINENAMES }
  680.  
  681. CONST
  682.     kCMApplProfileVersion        = $00000100;
  683.     grayResponse                = 0;
  684.     redResponse                    = 1;
  685.     greenResponse                = 2;
  686.     blueResponse                = 3;
  687.     cyanResponse                = 4;
  688.     magentaResponse                = 5;
  689.     yellowResponse                = 6;
  690.     ucrResponse                    = 7;
  691.     bgResponse                    = 8;
  692.     onePlusLastResponse            = 9;
  693.     rgbData                        = 'RGB ';
  694.     cmykData                    = 'CMYK';
  695.     grayData                    = 'GRAY';
  696.     xyzData                        = 'XYZ ';
  697.     monitorDevice                = 'mntr';
  698.     scannerDevice                = 'scnr';
  699.     printerDevice                = 'prtr';
  700.  
  701. TYPE
  702.     XYZComponent                        = INTEGER;
  703.     XYZColor                            = CMXYZColor;
  704.     CMResponseData                        = INTEGER;
  705.     IString                                = CMIString;
  706.     CMResponseColor                        = LONGINT;
  707.     responseColor                        = CMResponseColor;
  708. {$ENDC}
  709. {$ALIGN RESET}
  710. {$POP}
  711.  
  712. {$SETC UsingIncludes := CMICCProfileIncludes}
  713.  
  714. {$ENDC} {__CMICCPROFILE__}
  715.  
  716. {$IFC NOT UsingIncludes}
  717.  END.
  718. {$ENDC}
  719.